package com.bw.liuyushan.liuyushan20210904.MVP.Activity;

import android.view.View;
import android.widget.Button;
import android.widget.EditText;

import androidx.annotation.NonNull;

import com.blankj.utilcode.util.ToastUtils;
import com.bw.liuyushan.liuyushan20210904.MVP.Contrack.IContrackTest;
import com.bw.liuyushan.liuyushan20210904.MVP.Presenter.BasePresenterTest;
import com.bw.liuyushan.liuyushan20210904.R;
import com.bw.liuyushan.mvp_lib.VIew.BaseActivity;
import com.scwang.smart.refresh.layout.api.RefreshLayout;
import com.scwang.smart.refresh.layout.listener.OnRefreshLoadMoreListener;

/**
 * Liuyushan20210904
 * file name is : LoginActivity
 * created by Ender on 2021/9/4 11:56.
 * author : 刘雨杉
 * Describe:
 */
public class LoginActivity extends BaseActivity<BasePresenterTest> implements IContrackTest.C_ViewTest, OnRefreshLoadMoreListener {
    private android.widget.EditText name;
    private android.widget.EditText pass;
    private android.widget.Button login;

    @Override
    public int bindLayout() {
        return R.layout.activity_login;
    }

    @Override
    public void initView() {

        name = (EditText) findViewById(R.id.name);
        pass = (EditText) findViewById(R.id.pass);
        login = (Button) findViewById(R.id.login);
    }

    @Override
    public void initDate() {
        login.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                String string = name.getText().toString();
                String string1 = pass.getText().toString();
                if (string.isEmpty()){
                    ToastUtils.showShort("不能为空");
                }else{
                    if (string1.isEmpty()){
                        ToastUtils.showShort("不能为空");
                    }else{

                    }
                }
            }
        });
    }

    @Override
    public void onLoadMore(@NonNull RefreshLayout refreshLayout) {

    }

    @Override
    public void onRefresh(@NonNull RefreshLayout refreshLayout) {

    }
}
